package LandR.personal.personalHelp.Users;

public class User {
    private Integer id = 0;
    private String username = null;
    private String gender = null;
    private int age = 0;
    private String specificAddress = null;
    private String email = null;
    private String phoneNumber = null;
    private String introduce = null;
    private String imageAddress = null;
    private String year;
    private String month;
    private String day;
    private String province;
    private String city;
    private String countly;
    private String specificAge;

    public String getYear() {
        return year;
    }

    public void setYear(String Cyear) {
        this.year = Cyear;
    }

    public String getMonth() {
        return month;
    }

    public void setMonth(String Cmonth) {
        month = Cmonth;
    }

    public String getDay() {
        return day;
    }

    public void setDay(String Cday) {
        day = Cday;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String Cprovince) {
        province = Cprovince;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String Ccity) {
        city = Ccity;
    }

    public String getCountly() {
        return countly;
    }

    public void setCountly(String Ccountly) {
        countly = Ccountly;
    }

    /**
     * Returns a string representation of the object. In general, the
     * {@code toString} method returns a string that
     * "textually represents" this object. The result should
     * be a concise but informative representation that is easy for a
     * person to read.
     * It is recommended that all subclasses override this method.
     * <p>
     * The {@code toString} method for class {@code Object}
     * returns a string consisting of the name of the class of which the
     * object is an instance, the at-sign character `{@code @}', and
     * the unsigned hexadecimal representation of the hash code of the
     * object. In other words, this method returns a string equal to the
     * value of:
     * <blockquote>
     * <pre>
     * getClass().getName() + '@' + Integer.toHexString(hashCode())
     * </pre></blockquote>
     *
     * @return a string representation of the object.
     */
    @Override
    public String toString() {
        String show = "User:" + "[   id:" + this.id + "\n" +
                "username:" + this.username + "\n" +
                "gender:" + this.gender + "\n" +
                "age:" + this.age + "\n" +
                "specificAddress:" + specificAddress + "\n" +
                "email：" + this.email + "\n" +
                "phoneNumber：" + this.phoneNumber + "\n" +
                "introduce:" + this.introduce + "\n" +
                "imageAddress:" + this.imageAddress + "   " + "]";


        return show;
    }

    public User(Integer id, String username, String gender, int age, String CspecificAddress, String email, String phoneNumber, String introduce, String imageAddress) {
        this.id = id;
        this.username = username;
        this.gender = gender;
        this.age = age;
        specificAddress = CspecificAddress;
        this.email = email;
        this.phoneNumber = phoneNumber;
        this.introduce = introduce;
        this.imageAddress = imageAddress;
    }

    public User() {

    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSpecificAddress() {
        return specificAddress;
    }

    public void setSpecificAddress(String specificAddress) {
        this.specificAddress = specificAddress;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getIntroduce() {
        return introduce;
    }

    public void setIntroduce(String introduce) {
        this.introduce = introduce;
    }

    public String getImageAddress() {
        return imageAddress;
    }

    public void setImageAddress(String imageAddress) {
        this.imageAddress = imageAddress;
    }

    public void changeSpecificAddress() {
        this.specificAddress = this.province + "/" + this.city + "/" + this.countly;
    }

    public void changeAge() {
        this.specificAge = this.year + "/" + this.month + "/" + this.day;
    }

    public String getSpecificAge() {
        return specificAge;
    }

    public void setSpecificAge(String CspecificAge) {
        specificAge = CspecificAge;
    }
}
